<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection" />
		<meta content="emai=no" name="format-detection" />
		<link rel="stylesheet" type="text/css" href="/wc/css/common.css" />
		<link rel="stylesheet" type="text/css" href="/wc/css/form.css" />
		<link rel="stylesheet" type="text/css" href="/wc/css/apply.css" />
		<script type="text/javascript" src="/wc/js/jquery-1.11.2.min.js"></script>
		<script type="text/javascript" src="/wc/js/underscore.js"></script>
		<script type="text/javascript" src="/wc/js/pinchzoom.js"></script>
		<title>芝士妈妈在线</title>
	</head>

	<body>
		<div class="wrapper">
			<form action="/agent/inter" method="post">
				<h2>完善以下信息并提交，<br/>即完成申请：</h2>
				<section class="flex-wrapper flex-align-center">
					<label>姓名：</label>
					<p class="flex-1">
						<input type="text" id="name" name="name" value="" data-message="请输入姓名！" />
					</p>
				</section>
				<section class="flex-wrapper flex-align-center" id="sex" data-message="请选择性别！">
					<label>性别：</label>
					<input type="radio" name="sex" value="1" checked /><label class="checked">先生</label>
					<input type="radio" name="sex" value="2" /><label>女士</label>
				</section>
				<button type="submit" class="btn btn-red">确 认</button>
			</form>
		</div>
		<div class="hide popup-map">
			<div class="pinch-zoom">
				<img src="/wc/img/map.jpg" alt="" />
			</div>
		</div>
		<script src="/wc/js/common.js" type="text/javascript"></script>
		<script type="text/javascript">
			$(function() {
				initRadiobox();
				$("button[type='submit']").click(function(e) {
					e.preventDefault();
					validation();
				});
			});

			function validation() {
				zsmm.isValidated = true;
				validateInput("name");
				validateRadio("sex");
				if(zsmm.isValidated) {
					$("form").submit();
				}
			}

			function initRadiobox() {
				$("input[type='radio']").next("label").each(function(index, element) {
					$(this).click(function(e) {
						e.preventDefault();
						$(this).parent().parent().find("label").removeClass("checked");
						$(this).parent().parent().find("input[type = 'radio']").removeAttr("checked");
						$(this).addClass("checked");
                        $(this).prev("input[type = 'radio']").prop('checked',true);
					});
				});
			}
		</script>
	</body>

</html>